package com.aaa.entity;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;

@TableName("tbl_news")
public class News extends Model<News> {

    @TableId(type = IdType.AUTO)
    private Integer id;
    private String title;
    @TableField("create_by")
    private String createBy;
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:SS")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:SS")
    private Date createTime;
    @TableField("update_by")
    private String updateBy;
    @TableField("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:SS")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:SS")
    private Date updateTime;
    private String content;




    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }


    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    @Override
    public String toString() {
        return "News{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", createBy='" + createBy + '\'' +
                ", createTime=" + createTime +
                ", updateBy='" + updateBy + '\'' +
                ", updateTime=" + updateTime +
                ", content='" + content + '\'' +
                '}';
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
    private static final long serialVersionUID = 1L;
}
